
const Router=require("koa-router")
const {createupload,createuploads}=require("../middleware/uploadmiddleware")
const {verifyAuth}=require("../middleware/automiddleware")
const {uploadInfo,uploadsInfo}=require("../controller/file.controller")
const {resizePictrue}=require("../controller/moment_controller")
const router=new Router({prefix:"/uploads"})
//上传文件
router.post("/",verifyAuth,createupload,uploadInfo)
//上传多个图片
router.post("/pictrue",verifyAuth,createuploads,resizePictrue,uploadsInfo)
module.exports=router